﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
<h4>Confirm Window</h4>
<p>Get what user choose</p>
<script>
    var myMsg = '';

    if (confirm("Are you sure?")) {
        document.write("<p>The user is sure.</p>");
    } else {
        document.write("<p>The user is not sure.</p>");
    }
</script>

<h4>prompt()</h4>
<script>
    var myResult = prompt("What is your name?", "Carl");
    if (myResult !== null) {
        document.write("<p>Welcome " + myResult + "</p>");
    }
</script>
</body>
</html>